package com.example.springmcpserver.service;

import org.springframework.ai.tool.annotation.Tool;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class ToolsService {

  @Tool(description = "获取通用时间")
  public String getTime() {
    System.out.println("=============");
    return new Date().toString();
  }

  @Tool(description = "获取中国当前时间")
  public String getChinaTime() {
    System.out.println("======中国=======");
    return "中国" + new Date().toString();
  }

  @Tool(description = "获取美国当前时间")
  public String getAmericanTime() {
    System.out.println("======美国=======");
    return "美国" + new Date().toString();
  }
}
